<?php

use App\Image;
use Illuminate\Database\Seeder;

class ImagesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
//        Hack: use image filepath like this {{url($image->filepath)}}
        $images = [
            [
                'name'=>'カントリー！',
                'filepath'=>('uploaded_img/1.png'),
                'author_id'=>1,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>1,
            ],
            [
                'name'=>'小鸟游六花',
                'filepath'=>('uploaded_img/2.jpg'),
                'author_id'=>1,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>2,
            ],
            [
                'name'=>'高坂桐乃',
                'filepath'=>('uploaded_img/3.jpg'),
                'author_id'=>2,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>1,
            ],
            [
                'name'=>'Sky',
                'filepath'=>('uploaded_img/4.jpg'),
                'author_id'=>2,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>3,
            ],
            [
                'name'=>'test5',
                'filepath'=>('uploaded_img/5.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>1,
            ],
            [
                'name'=>'test6',
                'filepath'=>('uploaded_img/6.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test01',
                'filepath'=>('uploaded_img/avatar_mock_1.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test02',
                'filepath'=>('uploaded_img/avatar_mock_2.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test03',
                'filepath'=>('uploaded_img/avatar_mock_3.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test04',
                'filepath'=>('uploaded_img/avatar_mock_4.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test05',
                'filepath'=>('uploaded_img/avatar_mock_5.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test06',
                'filepath'=>('uploaded_img/detail_background_image_mock_1.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test07',
                'filepath'=>('uploaded_img/detail_background_image_mock_2.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test08',
                'filepath'=>('uploaded_img/detail_background_image_mock_3.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test09',
                'filepath'=>('uploaded_img/detail_background_image_mock_4.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
            [
                'name'=>'test10',
                'filepath'=>('uploaded_img/detail_background_image_mock_5.jpg'),
                'author_id'=>3,
                'ratings'=>10,
                'views'=>200,
                'total_score'=>1000,
                'resolution_height'=>1024,
                'resolution_width'=>768,
                'category_id'=>4,
            ],
        ];
        foreach ($images as $image) {
            Image::create($image);
        }
    }
}
